import { http } from "@/utils/http";
import { Result } from "../types";
import { exportExcel } from '@/utils/exportExcel'

type recordSearch = {
  code: string,
  content: string,
  pageNumber: number,
  pageSize: number,
  sortName: string,
  sortType: number
}

// 日志列表
export const recordList = (params?: recordSearch) => {
  return http.request<Result>("get", "/api/record/List", { params });
};

// 导出告警列表
export function excelRecord(data, fileName) {
  exportExcel('/api/record/Excel', data, fileName);
}
